# 基础镜像
FROM fedora

# 维护者信息
#MAINTAINER gzheng 990653058@qq.com

# 添加文件到容器
#ADD swoole1.9.3.tgz /root/

# 添加文件到容器
#COPY swoole1.9.3.tgz /root/

# 设置容器启动执行的命令,产生none镜像
# ENTRYPOINT ["/usr/sbin/init"]

# 设置容器启动执行的命令,产生none镜像
#CMD ["/usr/sbin/init"]

# 开放端口 疑问:这一步总是生成none的镜像
#EXPOSE 80


# 镜像的操作指令
RUN	rm -rf /etc/yum.repos.d/* && curl http://mirrors.aliyun.com/repo/fedora.repo -o /etc/yum.repos.d/fedora.repo && \
	curl http://mirrors.aliyun.com/repo/fedora-updates.repo -o /etc/yum.repos.d/fedora-updates.repo && \
	sed -i s/'RPM-GPG-KEY-fedora'/'RPM-GPG-KEY-fedora-$releasever'/g /etc/yum.repos.d/* && dnf makecache && \
	dnf -y update && dnf -y install findutils php php-cli php-devel php-pear php-fpm php-pdo php-mysqlnd \
	php-pecl-redis php-pecl-memcached php-pecl-mongodb php-intl php-pgsql php-gd php-pecl-amqp nginx gcc && \
 	pecl channel-update pecl.php.net&&dnf -y install make&&\
	dnf -y remove httpd-tools httpd && rm -rf /etc/httpd /usr/share/httpd /usr/lib64/httpd &&yum -y install redis && yum -y install php-mcrypt&& \
        yum -y install php-mbstring && yum -y install procps-ng && yum -y install httpd && \
	yum -y install net-tools && mv /etc/localtime /etc/localtime.bak && ln -s /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime  && \
	yum -y install crontabs && dnf install cronie cronie-anacron &&systemctl start crond.service \
	 && rm -rf /etc/nginx/nginx.conf && systemctl enable php-fpm.service nginx.service redis.service crond.service && \
	dnf clean all

#COPY ./file/nginx.conf /etc/nginx
#COPY ./file/smp.conf /etc/nginx/conf.d
#COPY ./file/root /var/spool/cron

# 设置数据卷
#VOLUME []
